<div class="container main-content">
	<h1>Administracija novosti</h1>
	
	<table class="admin">
	  <tr>
	    <th class="admin narrow"></th>
	    <th class="admin narrow"></th>
	    <th class="admin">Naslov</th>
	    <th class="admin">Kategorija</th>
	
	  </tr>
	
	<% @posts.each do |post| %>
	  <tr>
	    <td class="admin narrow"><%= link_to image_tag('black_icons/delete.png', :class => "button"), post, :confirm => 'Are you sure?', :method => :delete %></td>
	    <td class="admin narrow"><%= link_to image_tag('black_icons/pencil.png', :class => "button"), edit_post_path(post) %></td>
	    <td class="admin"><%= link_to post.title, post.url %></td>
	    <td class="admin"><%= post.category.name %></td>
	   </tr>
	<% end %>
	</table>
	
	<div class="admin_links">
	  <%= link_to "Dodaj novost", new_post_path %>  
	  <%= link_to "Uredi kategorije", categories_path %>
	</div>
</div>


